package com.du.cloud.oauth.service.impl;

import com.du.cloud.oauth.model.User;
import com.du.cloud.oauth.mapper.UserMapper;
import com.du.cloud.oauth.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Desc:
 * Author: dushuang
 * Date 2020/1/6 11:59
 */
@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;


    @Override
    public User getUserByName(String username) {
        return userMapper.getUserByName(username);
    }

    @Override
    public List<String> getUserAuthorization(Long userId) {
        return userMapper.getUserAuthorization(userId);
    }

    @Override
    public User getUserByClientId(String clientId) {
        return userMapper.getUserByClientId(clientId);
    }
}
